home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************/
- /* */
- /* Application: E D T V */
- /* */
- /* Description: This file contains all the routines for loading, */
- /* displaying, and disposing movies in a window. */
- /* */
- /* File: EDTV.c */
- /* */
- /* Files: about.c - routines for the about box */
- /* EDTV.c - routines for displaying movies */
- /* menu.c - routines for handling the menu */
- /* remote.c - routines for controlling the movie */
- /* EDTV.h - header file information */
- /* */
- /* Programmer: Edgar Lee */
- /* Organization: Apple Computer, Inc. */
- /* Department: Developer Technical Support, DTS */
- /* Language: C (Think C version 5.0) */
- /* Date Created: 10-26-91 */
- /* */
- /****************************************************************************/
-
- #include "EDTV.h"
-
- #define BORDER 100 /* Distance from the tv's rim to the window (in pixels). */
-
- #define DEFAULTWIDTH 300 /* Default width of the window. */
- #define DEFAULTHEIGHT 300 /* Default height of the window. */
-
- WindowPtr gWindow; /* Window used for displaying the movie. */
- Movie gMovie1; /* Movie stored in movie file. */
- Movie gMovie2; /* Copy of movie #1. */
- GWorldPtr gGWorld; /* Gworld used to store the offscreen image of the tv. */
- PixMapHandle gPixMap; /* Handle to gworld's pixmap. */
- RgnHandle gOrigMovieClipRgn; /* Region defining the movie's original clip region. */
-
- TimeValue gMovieDuration; /* Total runtime of movie. */
-
- Rect gMovie1Rect; /* Bounding rect used for movie #1. */
-
- int gTVWidth; /* Width of tv pict. */
- int gTVHeight; /* Height of tv pict. */
- int gTVRimW; /* Width of tv's rim. */
- int gTVRimH; /* Height of tv's rim. */
-
- int gMoviesStatus; /* Contains current status of player: */
- /* NO_MOVIE, MOVIE_LOADED, HIDDEN_MOVIE. */
-
- /*-------------------------------------------------------------------------------------*/
-
- main()
- {
- initMac(); /* Do the standard mac initialization. */
-
- checkSysEnviron(); /* Check if movie toolbox is installed. */
-
- EnterMovies(); /* Initialize the movie toolbox. */
- setUpMenus(); /* Create the menus. */
-
- initOffscreenTV(); /* Create the offscreen gworld containing the tv image. */
- initParameters(); /* Initialize the parameters used throughout the program. */
-
- createWindow(); /* Create the window used for the movie. */
- createRWindow(); /* Create the window used for the remote control. */
-
- doEventLoop(); /* Handle all incoming events. */
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void initMac()
- {
- InitGraf( &thePort );
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs( nil );
- InitCursor();
- FlushEvents( 0, everyEvent );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void checkSysEnviron()
- {
- long version;
-
- /* Even though QuickTime runs under system 6, EDTV requires system 7 since */
- /* some of the quickdraw routines it uses are only available under 7.0. */
-
- Gestalt( gestaltSystemVersion, &version );
-
- if (version < 0x0700)
- {
- ParamText( "\pSorry, this application only runs under system 7. Please try again.",
- "\p", "\p", "\p" );
- Alert( 128, nil );
- ExitToShell();
- }
-
- if (Gestalt( gestaltQuickTime, &version ) != noErr)
- {
- ParamText( "\pQuickTime not installed. Please try again.", "\p", "\p", "\p" );
- Alert( 128, nil );
- ExitToShell();
- }
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void initOffscreenTV()
- {
- Rect rect; /* Temporary rect used for the pict & gworld. */
- PicHandle pict; /* Handle to the tv pict stored in resource fork. */
- CGrafPtr currentPort; /* Port used before switching to the gworld's. */
- GDHandle currentDevice; /* GDevice used before switching to the gworld's. */
- DialogPtr dialog; /* Dialog displaying 'please wait' message. */
-
- dialog = GetNewDialog( 128, 0L, (WindowPtr)-1L );
- UpdtDialog( dialog, dialog->visRgn );
-
- pict = (PicHandle)GetResource( 'PICT', 129 );
-
- rect = (**pict).picFrame;
-
- gTVWidth = rect.right - rect.left;
- gTVHeight = rect.bottom - rect.top;
-
- NewGWorld( &gGWorld, 8, &rect, GetCTable( 8 + 32 ), nil, 0 );
- gPixMap = GetGWorldPixMap( gGWorld );
- LockPixels( gPixMap );
-
- GetGWorld( ¤tPort, ¤tDevice );
- SetGWorld( gGWorld, nil );
-
- EraseRect( &rect );
- DrawPicture( pict, &rect );
-
- SetGWorld( currentPort, currentDevice );
-
- KillPicture( pict );
- DisposDialog( dialog );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void initParameters()
- {
- gMoviesStatus = NO_MOVIE;
-
- SetRect( &gMovie1Rect, (DEFAULTWIDTH - gTVWidth) / 2,
- (DEFAULTHEIGHT - gTVHeight) / 2,
- (DEFAULTWIDTH - gTVWidth) / 2 + gTVWidth,
- (DEFAULTHEIGHT - gTVHeight) / 2 + gTVHeight );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void createWindow()
- {
- Rect rect;
-
- SetRect( &rect, RLEFT + RWIDTH + 10, RTOP,
- RLEFT + RWIDTH + 10 + DEFAULTWIDTH, RTOP + DEFAULTHEIGHT );
-
- gWindow = NewCWindow( 0L, &rect, "\pE D T V", true, noGrowDocProc,
- (WindowPtr)-1L, true, 0L );
-
- SetPort( gWindow );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void selectMovie()
- {
- SFTypeList typeList;
- StandardFileReply reply;
- short resRefNum;
- short resId = 0;
- Str255 resName;
- OSErr error;
-
- typeList[0] = 'MooV';
-
- HideWindow( gWindow );
- StandardGetFilePreview( nil, 1, typeList, &reply );
-
- if (reply.sfGood)
- {
- ClearMoviesStickyError();
-
- error = OpenMovieFile( &reply.sfFile, &resRefNum, fsRdPerm );
- error = NewMovieFromFile( &gMovie1, resRefNum, &resId, resName, newMovieActive, nil );
- error = NewMovieFromFile( &gMovie2, resRefNum, &resId, resName, newMovieActive, nil );
- error = CloseMovieFile( resRefNum );
-
- if (gMovie1 == nil || gMovie2 == nil || error)
- return;
-
- SetMovieGWorld( gMovie1, (CGrafPtr)gWindow, nil );
- SetMovieGWorld( gMovie2, (CGrafPtr)gWindow, nil );
-
- gOrigMovieClipRgn = GetMovieClipRgn( gMovie1 );
-
- SetMovieActive( gMovie1, false );
- SetMovieActive( gMovie2, false );
-
- GetMovieBox( gMovie1, &gMovie1Rect );
-
- gMovieDuration = GetMovieDuration( gMovie1 );
-
- gMoviesStatus = MOVIE_LOADED;
- setupDisplay();
-
- SetWTitle( gWindow, reply.sfFile.name );
- ShowWindow( gWindow );
- }
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void closeMovie()
- {
- gMoviesStatus = NO_MOVIE;
-
- redrawRemoteOnClose();
-
- SetPort( gWindow );
- HideWindow( gWindow );
-
- DisposeMovie( gMovie1 );
- DisposeMovie( gMovie2 );
-
- initParameters();
- SizeWindow( gWindow, DEFAULTWIDTH, DEFAULTHEIGHT, true );
- updateGWorld();
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void setupDisplay()
- {
- resizeWindow();
- positionMovie();
- updateGWorld();
- drawVolume();
- drawPoster();
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void resizeWindow()
- {
- int width, height;
-
- gTVRimW = 60.0 * ((float)(gMovie1Rect.right - gMovie1Rect.left) / (float)gTVWidth);
- gTVRimH = 60.0 * ((float)(gMovie1Rect.bottom - gMovie1Rect.top) / (float)gTVHeight);
-
- width = gMovie1Rect.right - gMovie1Rect.left + gTVRimW + BORDER;
- height = gMovie1Rect.bottom - gMovie1Rect.top + gTVRimH + BORDER;
-
- SizeWindow( gWindow, width, height, true );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void positionMovie()
- {
- int width, height;
-
- width = gWindow->portRect.right - gWindow->portRect.left;
- height = gWindow->portRect.bottom - gWindow->portRect.top;
-
- OffsetRect( &gMovie1Rect, -gMovie1Rect.left, -gMovie1Rect.top);
- OffsetRect( &gMovie1Rect, (width - (gMovie1Rect.right - gMovie1Rect.left)) / 2,
- (height - (gMovie1Rect.bottom - gMovie1Rect.top)) * 0.45 );
-
- SetMovieBox( gMovie1, &gMovie1Rect );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void updateGWorld()
- {
- Rect rect;
- CGrafPtr currentPort; /* Port used before switching to the gworld. */
- GDHandle currentDevice; /* GDevive used before switching to the gworld. */
-
- rect = gMovie1Rect;
- InsetRect( &rect, -gTVRimW, -gTVRimH );
-
- GetGWorld( ¤tPort, ¤tDevice );
-
- SetGWorld( gGWorld, nil );
-
- UpdateGWorld( &gGWorld, 8, &rect, GetCTable( 8 + 32 ), nil, stretchPix );
- gPixMap = GetGWorldPixMap( gGWorld );
- LockPixels( gPixMap );
-
- SetGWorld( currentPort, currentDevice );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void setGridClipRgn( divisions )
- int divisions;
- {
- int i, j;
- int width, height;
- RgnHandle rgn;
- Rect rectRgn;
-
- SetPort( gWindow );
-
- StopMovie( gMovie2 );
- SetMovieActive( gMovie2, false );
-
- useColor( BLACK, FG );
- PaintRect( &gMovie1Rect );
-
- width = (gMovie1Rect.right - gMovie1Rect.left) / divisions + 1;
- height = (gMovie1Rect.bottom - gMovie1Rect.top) / divisions + 1;
-
- rgn = NewRgn();
-
- if (divisions == 1)
- rgn = gOrigMovieClipRgn;
- else
- {
- rgn = NewRgn();
-
- OpenRgn();
-
- for (j = 0; j < divisions; j++)
- {
- for ( i = 0; i < divisions; i++)
- {
- rectRgn.left = width * i + 1;
- rectRgn.top = height * j + 1;
- rectRgn.right = width * i + width;
- rectRgn.bottom = height * j + height;
-
- FrameRect( &rectRgn );
- }
- }
-
- CloseRgn( rgn );
- }
-
- SetMovieClipRgn( gMovie1, rgn );
- SetMovieBox( gMovie1, &gMovie1Rect );
-
- DisposeRgn( rgn );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void setPiPClipRgn( pos )
- int pos;
- {
- int width, height;
- Rect rect;
- Rect pipRect;
- RgnHandle rgn;
-
- SetPort( gWindow );
-
- SetMovieActive( gMovie2, false );
-
- rect = gMovie1Rect;
- OffsetRect( &rect, -rect.left, -rect.top );
-
- width = rect.right - rect.left;
- height = rect.bottom - rect.top;
-
- pipRect = rect;
-
- InsetRect( &pipRect, width / 4, height / 4 );
-
- if (pos == LRSPOT)
- OffsetRect( &pipRect, width / 5, height / 5 );
- else if (pos == URSPOT)
- OffsetRect( &pipRect, width / 5, -height / 5 );
- else if (pos == ULSPOT)
- OffsetRect( &pipRect, -width / 5, -height / 5 );
- else if (pos == LLSPOT)
- OffsetRect( &pipRect, -width / 5, height / 5 );
-
- rgn = NewRgn();
- OpenRgn();
-
- FrameRect( &rect );
- FrameRect( &pipRect );
-
- CloseRgn( rgn );
-
- SetMovieClipRgn( gMovie1, rgn );
- SetMovieBox( gMovie1, &gMovie1Rect );
-
- rect = pipRect;
- OffsetRect( &rect, -rect.left, -rect.top );
- OffsetRect( &rect, gMovie1Rect.left + pipRect.left, gMovie1Rect.top + pipRect.top );
-
- SetMovieBox( gMovie2, &rect );
- SetMovieClipRgn( gMovie2, gOrigMovieClipRgn );
-
- if (!GetMovieActive( gMovie2 ))
- SetMovieActive( gMovie2, true );
-
- DisposeRgn( rgn );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void setSplitClipRgn( pos )
- int pos;
- {
- int width, height;
- Rect rect;
- Rect pipRect;
- RgnHandle rgn;
-
- SetPort( gWindow );
-
- rect = gMovie1Rect;
- OffsetRect( &rect, -rect.left, -rect.top );
-
- width = rect.right - rect.left;
- height = rect.bottom - rect.top;
-
- pipRect = rect;
-
- if (pos == RSPLIT)
- {
- pipRect.left = pipRect.left + (pipRect.right - pipRect.left) / 2;
- rect.right = rect.right - (rect.right - rect.left) / 2;
- }
- else if (pos == LSPLIT)
- {
- pipRect.right = pipRect.right - (pipRect.right - pipRect.left) / 2;
- rect.left = rect.left + (rect.right - rect.left) / 2;
- }
- else if (pos == TSPLIT)
- {
- pipRect.top = pipRect.top + (pipRect.bottom - pipRect.top) / 2;
- rect.bottom = rect.bottom - (rect.bottom - rect.top) / 2;
- }
- else if (pos == BSPLIT)
- {
- pipRect.bottom = pipRect.bottom - (pipRect.bottom - pipRect.top) / 2;
- rect.top = rect.top + (rect.bottom - rect.top) / 2;
- }
-
- rgn = NewRgn();
- OpenRgn();
-
- FrameRect( &rect );
- FrameRect( &pipRect );
-
- CloseRgn( rgn );
-
- SetMovieClipRgn( gMovie1, rgn );
- OffsetRect( &rect, gMovie1Rect.left, gMovie1Rect.top );
- SetMovieBox( gMovie1, &rect );
-
- rect = pipRect;
- OffsetRect( &rect, -rect.left, -rect.top );
- OffsetRect( &rect, gMovie1Rect.left + pipRect.left, gMovie1Rect.top + pipRect.top );
-
- SetMovieBox( gMovie2, &rect );
- SetMovieClipRgn( gMovie2, gOrigMovieClipRgn );
-
- if (!GetMovieActive( gMovie2 ))
- SetMovieActive( gMovie2, true );
-
- DisposeRgn( rgn );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void setStillFrames()
- {
- int i, j;
- int divisions = 3;
- int width, height;
- Rect rect;
- TimeRecord tr;
- TimeValue timeValue;
- PicHandle pict;
- RgnHandle rgn;
-
- if (divisions == 1)
-
- SetPort( gWindow );
-
- StopMovie( gMovie1 );
- StopMovie( gMovie2 );
-
- setGridClipRgn( 1 );
-
- SetMovieActive( gMovie1, false );
- SetMovieActive( gMovie2, false );
-
- width = (gMovie1Rect.right - gMovie1Rect.left) / divisions;
- height = (gMovie1Rect.bottom - gMovie1Rect.top) / divisions;
-
- useColor( BLACK, FG );
- PaintRect( &gMovie1Rect );
-
- timeValue = GetMovieTime( gMovie1, &tr );
-
- for (j = 0; j < divisions; j++)
- {
- for ( i = 0; i < divisions; i++)
- {
- timeValue += tr.scale;
-
- if (timeValue > gMovieDuration)
- timeValue = 0;
-
- SetRect( &rect, gMovie1Rect.left + width * i,
- gMovie1Rect.top + height * j,
- gMovie1Rect.left + width * i + width,
- gMovie1Rect.top + height * j + height );
-
- pict = GetMoviePict( gMovie1, timeValue );
- DrawPicture( pict, &rect );
- KillPicture( pict );
- }
- }
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void drawWindowAndMovie()
- {
- Rect rect;
- BitMap TVMask;
-
- SetPort( gWindow );
-
- useColor( BLACK, FG );
- useColor( WHITE, BG );
-
- PaintRect( &gWindow->portRect );
-
- rect = gMovie1Rect;
- InsetRect( &rect, -gTVRimW, -gTVRimH );
-
- createTVMask( &rect, &TVMask );
- CopyDeepMask( (BitMap*)*gPixMap, &TVMask, &gWindow->portBits,
- &(**gPixMap).bounds, &rect, &rect,ditherCopy, 0 );
-
- DisposePtr( TVMask.baseAddr );
-
- if (gMoviesStatus == MOVIE_HIDDEN)
- setStillFrames();
-
- if (gMoviesStatus == MOVIE_LOADED)
- SetMovieActive( gMovie1, true );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void drawWindowOnly()
- {
- Rect rect;
- PicHandle pict;
-
- SetPort( gWindow );
-
- pict = (PicHandle)GetResource( 'PICT', 128 );
- HPurge( pict );
- DrawPicture( pict, &gWindow->portRect );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void createTVMask( rect, TVMask )
- Rect *rect;
- BitMap *TVMask;
- {
- long count;
- RGBColor white = { 0xffff, 0xffff, 0xffff };
- pascal Boolean matchProc();
-
- TVMask->bounds = *rect;
- TVMask->rowBytes = (TVMask->bounds.right - TVMask->bounds.left + 15) / 16 * 2;
- count = TVMask->rowBytes * (TVMask->bounds.bottom - TVMask->bounds.top);
- TVMask->baseAddr = NewPtrClear( count );
-
- CalcCMask( (BitMap*)*gPixMap, TVMask, &(**gPixMap).bounds,
- rect, &white, matchProc, 0 );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- static pascal Boolean matchProc( color, position )
- RGBColor *color;
- long *position;
- {
- GDHandle currDevice; /* Handle to the current GDevice. */
- MatchRec *matchInfo; /* Pointer to the GDevice’s MatchRec record. */
-
- currDevice = GetGDevice();
- matchInfo = (MatchRec *)(**currDevice).gdRefCon;
-
- if (matchInfo->red == color->red && matchInfo->green == color->green &&
- matchInfo->blue == color->blue)
- *position = 0;
- else
- *position = 1;
-
- return true;
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void useColor( index, which )
- int index;
- int which;
- {
- RGBColor color;
-
- if (index == WHITE)
- color.red = color.green = color.blue = 0xffff;
- else if (index == BLACK)
- color.red = color.green = color.blue = 0;
- else if (index == SLATE)
- color.red = color.green = color.blue = 8738;
- else if (index == RED)
- {
- color.red = 0xffff;
- color.green = color.blue = 0;
- }
- else if (index == MUSTARD)
- {
- color.red = color.green = 65535;
- color.blue = 39321;
- }
- else if (index == GREY)
- color.red = color.green = color.blue = 0x4fff;
- else if (index == BLUE)
- {
- color.red = color.green = 0;
- color.blue = 0xffff;
- }
-
- if (which == BG)
- RGBBackColor( &color );
- else
- RGBForeColor( &color );
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void doEventLoop()
- {
- EventRecord anEvent;
- WindowPtr evtWind;
- short clickArea;
- Rect screenRect;
- Boolean ret;
- Point point;
- long tick;
- long movies1Value, movies2Value;
- static TimeValue oMovies1Value = 0, oMovies2Value = 0;
- static long otick = 0;
- extern WindowPtr gRWindow;
- extern int gLoopSetting;
-
- for (;;)
- {
- ret = WaitNextEvent( everyEvent, &anEvent, 0, nil );
-
- if (gMoviesStatus == MOVIE_LOADED)
- {
- if (IsMovieDone( gMovie1 ) && GetMovieRate( gMovie1 ) > 0)
- {
- if (gLoopSetting == CONTINUOUS_PLAY)
- GoToBeginningOfMovie( gMovie1 );
- else
- StopMovie( gMovie1 );
- }
- else if (GetMovieTime( gMovie1, nil ) == 0 && GetMovieRate( gMovie1 ) < 0)
- {
- if (gLoopSetting == CONTINUOUS_PLAY)
- GoToEndOfMovie( gMovie1 );
- else
- StopMovie( gMovie1 );
- }
-
- MoviesTask( gMovie1, (long)0 );
-
- if (GetMovieActive( gMovie2 ))
- {
- if (IsMovieDone( gMovie2 ) && GetMovieRate( gMovie2 ) > 0)
- {
- if (gLoopSetting == CONTINUOUS_PLAY)
- GoToBeginningOfMovie( gMovie2 );
- else
- StopMovie( gMovie2 );
- }
- else if (GetMovieTime( gMovie2, nil ) == 0 && GetMovieRate( gMovie2 ) < 0)
- {
- if (gLoopSetting == CONTINUOUS_PLAY)
- GoToEndOfMovie( gMovie2 );
- else
- StopMovie( gMovie2 );
- }
-
- MoviesTask( gMovie2, (long)0 );
- }
-
- if (((tick = TickCount()) - otick) >= 15)
- {
- movies1Value = GetMovieTime( gMovie1, nil );
- movies2Value = GetMovieTime( gMovie2, nil );
-
- if ((movies1Value != oMovies1Value) || (movies2Value != oMovies2Value))
- {
- drawCurrentTime();
- oMovies1Value = movies1Value;
- oMovies2Value = movies2Value;
- }
- otick = tick;
- }
- }
-
- if (ret)
- {
- if (anEvent.what == mouseDown)
- {
- clickArea = FindWindow( anEvent.where, &evtWind );
-
- if (clickArea == inDrag)
- {
- screenRect = (**GetGrayRgn ()).rgnBBox;
- DragWindow( evtWind, anEvent.where, &screenRect );
- }
- else if (clickArea == inMenuBar)
- {
- adjustMenus();
- handleMenu( MenuSelect( anEvent.where ) );
- }
- else if (clickArea == inContent)
- {
- if (evtWind != FrontWindow())
- SelectWindow( evtWind );
-
- if (evtWind == gRWindow)
- {
- SetPort( gRWindow );
-
- point = anEvent.where;
- GlobalToLocal( &point );
-
- doRemoteEvent( point );
- }
- }
- else if (clickArea == inGoAway)
- if (TrackGoAway( evtWind, anEvent.where ))
- {
- if (gMoviesStatus == MOVIE_LOADED)
- closeMovie();
- else
- HideWindow( gWindow );
- }
- }
- else if (anEvent.what == updateEvt)
- {
- evtWind = (WindowPtr)anEvent.message;
- SetPort( evtWind );
-
- BeginUpdate( evtWind );
-
- if (evtWind == gWindow)
- {
- if (gMoviesStatus == NO_MOVIE)
- drawWindowOnly();
- else
- {
- UpdateMovie( gMovie1 );
-
- if (GetMovieActive( gMovie2 ))
- UpdateMovie( gMovie2 );
-
- drawWindowAndMovie();
-
- MoviesTask( gMovie1, (long)0 );
- MoviesTask( gMovie2, (long)0 );
- }
-
- }
- else if (evtWind == gRWindow)
- drawRemote();
-
- EndUpdate (evtWind);
- }
- else if (anEvent.what == keyDown || anEvent.what == autoKey)
- {
- if ((anEvent.modifiers & cmdKey) != 0)
- {
- adjustMenus();
- handleMenu( MenuKey( (char)(anEvent.message & charCodeMask) ) );
- }
- }
- }
- }
- }
-
- /*-------------------------------------------------------------------------------------*/
-
- void quit()
- {
- if (gMoviesStatus == MOVIE_LOADED)
- {
- DisposeMovie( gMovie1 );
- DisposeMovie( gMovie2 );
- }
-
- ExitMovies();
- ExitToShell();
- }
-